#include "bsp_beep.h"

void beep_init(void)
{
    IOMUXC_SetPinMux(IOMUXC_SNVS_SNVS_TAMPER1_GPIO5_IO01, 0);
    IOMUXC_SetPinConfig(IOMUXC_SNVS_SNVS_TAMPER1_GPIO5_IO01, 0x10b0);
    GPIO5->GDIR |= ((0x1) << 1);
    GPIO5->DR |= ((0x1) << 1);
}
void beep_switch(u8 status)
{
    if (status == ON)
    {
        GPIO5->DR = ~((0x1) << 1);
    }
    else
    {
        GPIO5->DR = ((0x1) << 1);
    }
}
